package com.coldchain.admin.search;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.coldchain.common.enums.PlatformTypeEnum;
import com.fangliai.core.entitiy.BaseSearch;

import java.io.Serializable;

/**
 * @ClassName MapSearch
 * @Description TODO
 * @Author fangliai
 * @Date 2018/9/15 13:01
 * @Vesion 1
**/
public class MapSearch  extends BaseSearch implements Serializable {
    private  Integer enable;
    private PlatformTypeEnum platform;


    public Integer getEnable() {
        return enable;
    }

    public void setEnable(Integer enable) {
        this.enable = enable;
    }

    public PlatformTypeEnum getPlatform() {
        return platform;
    }

    public void setPlatform(PlatformTypeEnum platform) {
        this.platform = platform;
    }


    @Override
    public QueryWrapper initWrapper() {
        QueryWrapper wrapper=new QueryWrapper();
        if(enable!=null ){
            wrapper.eq("enable", enable);
        }
        if(platform!=null){
            wrapper.eq("platform", platform);
        }
        return wrapper;
    }
}
